﻿using B.S.EventHandle.ErrorCode;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.SmartStorPro.Domain
{
    /// <summary>
    /// 应收表
    /// </summary>
    public class Receivables
    {
        /// <summary>
        /// 应收表--主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int ReceiptlD { get; set; }
        /// <summary>
        /// 流水号
        /// </summary>
        /// 
        [MaxLength(50)]
        public string ReceivableNumber {  get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        /// 
        [MaxLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 分类
        /// </summary>
        public int CategoryId { get; set; }
        /// <summary>
        /// 最后付款日
        /// </summary>
        public DateOnly LastPayment {  get; set; }
        /// <summary>
        /// 收款方
        /// </summary>
        /// 
        [MaxLength(50)]
        public string Beneficiary { get; set; }

        /// <summary>
        /// 付款方
        /// </summary>
        /// 
        [MaxLength(50)]
        public string Payer { get; set; }
        /// <summary>
        /// 应收金额
        /// </summary>
        public decimal AmountDue { get; set; }
        ///// <summary>
        ///// 实收金额
        ///// </summary>
        public decimal? ActualAmount { get; set; }
        ///// <summary>
        ///// 剩余金额
        ///// </summary>
        public decimal? RemainingAmount { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public ReceivablesStatus Status { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 付款机构
        /// </summary>
        /// 
        [MaxLength(50)]
        public string? PayingAgency { get; set; }
        /// <summary>
        /// 付款方式
        /// </summary>
        /// 
        [MaxLength(50)]
        public string? PaymentMethod { get; set; }

        /// <summary>
        /// 付款金额
        /// </summary>
        public decimal? PaymentAmount { get; set; }
        /// <summary>
        /// 付款次数
        /// </summary>
        public int Payments {  get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        /// 
        [MaxLength(255)]
        public string Remarks { get; set; }
        /// <summary>
        /// 是否删除(1-删除 0正常)
        /// </summary>
        public bool IsDelete { get; set; }

    }
}
